// nbmade-modules/nbmade-iot/src/main/java/com/nbcio/iot/domain/entity/IotNodeRedFlow.java
package com.nbcio.iot.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nbcio.common.mybatis.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * Node-RED Flow 配置
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("iot_nodered_flow")
public class IotNodeRedFlow extends BaseEntity {

    @TableId(value = "flow_id", type = IdType.ASSIGN_ID)
    private Long flowId;

    @TableField("flow_name")
    private String flowName;

    @TableField("flow_description")
    private String flowDescription;

    @TableField("flow_config")
    private String flowConfig; // JSON 格式的 Flow 配置

    @TableField("is_active")
    private Boolean isActive;

    @TableField("is_running")
    private Boolean isRunning;

    /**
     * 是否全局默认规则
     */
    @TableField("is_default")
    private Boolean isDefault;

    @TableField("version")
    private Integer version;
}